package com.lumlord.mapper.custom;

import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * @Classname CommonDao
 * @description: 公共的service
 * @author: pengdingding
 * @create: 2020-04-29 11:10
 * @Version V1.0（版本号）
 **/
@Component
public interface CommonDao {
    /**
     * 查询单条数据字典信息
     * @return
     */
    Map<String,Object>  selectDicById(int id);

    /**
     * 劳务人员id查询信息
     * @param laborId
     * @return
     */

    @Select("SELECT labor.NAME name,labor.ID insId,mgn.WORK_TYPE workType from yw_security_server.t_labor_management mgn left join yw_labor_server.t_institutions_labor labor on labor.id = mgn.INSTITUTIONS_ID where mgn.id = #{laborId}")
    Map<String,Object> selectLaborName(Integer laborId);

    /**
     * 查询下级数据字典信息：id
     * @return
     */
    List<Map<String,Object>>  selectNextDicById(Integer id);

    /**
     * 根据字段名查询当前数据字典信息
     * @return
     */
    Map<String,Object>  selectNowDicByName(String filedName);

}
